#include "formeditorw.h"
#include "formwindoww.h"
#include "eclipseintegration.h"

EclipseIntegration::EclipseIntegration(QDesignerFormEditorInterface *core, FormEditorW *parent) : qdesigner_internal::QDesignerIntegration(core, parent), m_formEditorW(parent)
{
}

void EclipseIntegration::updateSelection()
{
    if (FormWindowW *afww = m_formEditorW->activeFormWindowW())
        afww->updateFormWindowSelectionHandles(true);

    qdesigner_internal::QDesignerIntegration::updateSelection();
}

QWidget *EclipseIntegration::containerWindow(QWidget *widget) const
{
    Q_UNUSED(widget);

    FormWindowW *formwindow = m_formEditorW->activeFormWindowW();

    if (formwindow)
        return formwindow->integrationContainer();

    return 0;
}
